import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
//一级路由页面
import login from '../nav/login.vue'
import index from '../nav/index.vue'
//二级路由页面
import fitst from '../nav/sub/first.vue'
import second from '../nav/sub/second.vue'
import third from '../nav/sub/third.vue'
import forth from '../nav/sub/forth.vue'
//三级路由页面
import monday from '../nav/xingqi/monday.vue'
import tuesday from '../nav/xingqi/tuesday.vue'
import wednesday from '../nav/xingqi/wednesday.vue'
//1.声明式导航
import one from '../router1/one.vue'
import two from '../router1/two.vue'
import three from '../router1/three.vue'
import notfount from '../router1/404.vue'

Vue.use(VueRouter)

const routes = [

  // {
  //   path: '/',
  //   name: 'one',
  //   component: one,
  //   redirect: "898"//重定向
  // },
  // {
  //   // path: '/two/:content',
  //   path: '/two',
  //   name: 'two',
  //   component: two
  // },
  // {
  //   path: '/three/',
  //   name: 'three',
  //   component: three
  // },
  // {
  //   path: '*',
  //   name: 'notfount',
  //   component: notfount
  // }
  // //登陆
  {
    path: '/',
    name: 'login',
    component: login
  },
  //首页
  {
    path: '/index',
    name: 'index',
    component: index,
    redirect: '/index/fitst',
    children: [
      {
        path: '/index/fitst',
        name: 'fitst',
        component: fitst,
        redirect: '/monday',
        children: [
          {
            path: '/monday',
            name: 'monday',
            component: monday,
          },
          {
            path: '/tuesday',
            name: 'tuesday',
            component: tuesday,
          },
          {
            path: '/wednesday',
            name: 'wednesday',
            component: wednesday,
          },

        ]
      },
      {
        path: '/index/second',
        name: 'second',
        component: second,
      },
      {
        path: '/index/third',
        name: 'third',
        component: third,
      },
      {
        path: '/index/forth',
        name: 'forth',
        component: forth,
      },
    ]

  },

]

const router = new VueRouter({
  mode: 'hash',
  routes
})

export default router
